package cn.edu.sgu.www.mhxysy.service.role.impl;

import cn.edu.sgu.www.mhxysy.entity.role.RoleConfigJiadian;
import cn.edu.sgu.www.mhxysy.mapper.role.RoleConfigJiadianMapper;
import cn.edu.sgu.www.mhxysy.service.role.RoleConfigJiadianService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Service
public class RoleConfigJiadianServiceImpl implements RoleConfigJiadianService {

    private final RoleConfigJiadianMapper roleConfigJiadianMapper;

    @Autowired
    public RoleConfigJiadianServiceImpl(RoleConfigJiadianMapper roleConfigJiadianMapper) {
        this.roleConfigJiadianMapper = roleConfigJiadianMapper;
    }

    @Override
    public RoleConfigJiadian selectByConfigId(Integer configId) {
        QueryWrapper<RoleConfigJiadian> queryWrapper = new QueryWrapper<>();

        queryWrapper.eq("config_id", configId);

        return roleConfigJiadianMapper.selectOne(queryWrapper);
    }

}